package com.app.logrecord.controller;

import com.app.core.mvc.result.Result;
import com.app.core.mvc.serialization.argument.GetRequestBody;
import com.app.logrecord.pojo.dto.OperationFieldPageDto;
import com.app.logrecord.pojo.po.OperationField;
import com.app.logrecord.service.OperationFieldService;
import io.swagger.annotations.Api;
import io.swagger.annotations.ApiOperation;
import lombok.RequiredArgsConstructor;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;

import java.util.List;

/**
 * @author qiangt
 * @version 1.0
 * @date 2024/3/29 15:34
 * @description: 操作记录字段控制器
 */
@RequiredArgsConstructor
@Api(tags = "操作记录字段")
@RestController
@RequestMapping("/v1/operationField")
public class OperationFieldController {

    private final OperationFieldService operationFieldService;

    @ApiOperation("分页查询")
    @GetMapping("/page")
    public Result<List<OperationField>> pageByBusinessId(@GetRequestBody OperationFieldPageDto pageDto) {
        return Result.success(operationFieldService.pageByOperationId(pageDto));
    }
}
